cmake_minimum_required(VERSION 4.0)
project(keyboard_hook C)

set(CMAKE_C_STANDARD 17)

add_library(keyboard_hook SHARED keyboard_hook_dll.c)
target_compile_definitions(keyboard_hook PRIVATE KEYBOARD_HOOK_DLL_EXPORTS)
target_link_libraries(keyboard_hook ${CMAKE_CURRENT_SOURCE_DIR}/libuiohook.a)

# Windows specific libraries
if(WIN32)
    target_link_libraries(keyboard_hook user32)
endif()

add_executable(dll_example dll_example.c)
target_link_libraries(dll_example keyboard_hook)